<template>
    <div class="pop_layer" v-show="modalVisible">
        <Alert :type="alertType" show-icon closable @on-close="close">
            <h4>{{title}}</h4>
            <span slot="desc">{{desc}}</span>
        </Alert>
    </div>
</template>
<script>
    export default {
        name: "alertModal",
        props:{
            title:{
                type:String,
                default:"",
            },
            desc:{
                type:String,
                default:""
            },
            alertType:{
                type:String,
                default:"error"
            },
            onCloseFun:Function
        },
        data(){
            return {
                modalVisible:false,
            }
        },
        methods:{
            close(){
                this.modalVisible = false;
                if(this.onCloseFun){
                    this.onCloseFun()
                }
            }
        },
    }

</script>
